package top.wangxiaomei.ai.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;
import lombok.Getter;

/**
 *
 * @TableName models
 */
@TableName(value ="models")
@Data
public class Models implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 匹配项1
     */
    private String matche1;

    /**
     * 匹配项2
     */
    private String matche2;

    /**
     * 匹配结果
     */
    private String model;

    /**
     *
     */
    @Getter
    private String data;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Models(String s1, String s2, String model, String data) {
        this.matche1 = s1;
        this.matche2 = s2;
        this.model = model;
        this.data = data;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Models other = (Models) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getMatche1() == null ? other.getMatche1() == null : this.getMatche1().equals(other.getMatche1()))
                && (this.getMatche2() == null ? other.getMatche2() == null : this.getMatche2().equals(other.getMatche2()))
                && (this.getModel() == null ? other.getModel() == null : this.getModel().equals(other.getModel()))
                && (this.getData() == null ? other.getData() == null : this.getData().equals(other.getData()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMatche1() == null) ? 0 : getMatche1().hashCode());
        result = prime * result + ((getMatche2() == null) ? 0 : getMatche2().hashCode());
        result = prime * result + ((getModel() == null) ? 0 : getModel().hashCode());
        result = prime * result + ((getData() == null) ? 0 : getData().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", matche1=").append(matche1);
        sb.append(", matche2=").append(matche2);
        sb.append(", model=").append(model);
        sb.append(", data=").append(data);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}